//
//  category_collection_cell.m
//  pmmSS
//
//  Created by Mac book on 2017/9/25.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "category_collection_cell.h"

@implementation category_collection_cell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {


        [self iniSubViews];
    }
    return self;
}

-(void)iniSubViews{

    WeakSelf(weakSelf);
    _label = [HMLabel createLabelWithText:@"工型钢" andTextColor:[UIColor blackColor] andBgColor:nil andFont:[UIFont fontWithName:@"PingFangSC-Regular" size:autoScaleW(12)] andTextAlignment:NSTextAlignmentCenter];
    [self.contentView addSubview:_label];

    _imageView = [[UIImageView alloc]init];
    _imageView.backgroundColor = [UIColor yellowColor];
    [_imageView setImage:[UIImage imageNamed:@"list_icon_shop"]];

    [self.contentView addSubview:_imageView];

    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerX.mas_equalTo(weakSelf.contentView);
        make.top.mas_equalTo(autoScaleH(10));
        make.width.mas_equalTo(autoScaleW(70));
        make.height.mas_equalTo(autoScaleH(70));

    }];

    [_label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerX.mas_equalTo(_imageView);
        make.top.mas_equalTo(_imageView.mas_bottom).offset(autoScaleH(10));
        make.width.mas_equalTo(autoScaleW(70));
        make.height.mas_equalTo(autoScaleH(14));

    }];



}
@end
